Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add event messaging on badge update and application delay #4721

Merged
merged 1 commit into from
Aug 25, 2016
Merged

add event messaging on badge update and application delay #4721

merged 1 commit into from
Aug 25, 2016

Conversation

duttonw
Copy link
Contributor

@duttonw duttonw commented Aug 25, 2016

Short Description:

update to store player_data and check_awarded_badges on success
emit events when awarded badge is returned and begin code changes for equip badge

Fixes

begin fixing #4522

@solderzzc
Copy link
Contributor

Good feature

@solderzzc solderzzc merged commit 6ae9c7f into PokemonGoF:dev Aug 25, 2016
@solderzzc
Copy link
Contributor

Oops, need revert since the exception:
[sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/

Traceback (most recent call last): File "pokecli.py", line 705, in <module> main() File "pokecli.py", line 118, in main bot.tick() File "/Users/simba/Projects/pokemon/PokemonGo-Bot/pokemongo_bot/__init__.py", line 610, in tick if worker.work() == WorkerResult.RUNNING: File "/Users/simba/Projects/pokemon/PokemonGo-Bot/pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 341, in work if not step_walker or not step_walker.step(): File "/Users/simba/Projects/pokemon/PokemonGo-Bot/pokemongo_bot/walkers/step_walker.py", line 93, in step self.bot.heartbeat() File "/Users/simba/Projects/pokemon/PokemonGo-Bot/pokemongo_bot/__init__.py", line 1185, in heartbeat data={'badge': BadgeType_pb2._BADGETYPE.values_by_number[self._awarded_badges['awarded_badges']].name, TypeError: unhashable type: 'list' 2016-08-25 13:35:57,548 [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/) Traceback (most recent call last): File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open response = self._open(req, data) File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open '_open', req) File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain result = func(*args) File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in request self._send_request(method, url, body, headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1093, in _send_request self.endheaders(body) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1049, in endheaders self._send_output(message_body) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 891, in _send_output msg += message_body File "/Users/simba/Projects/pokemon/PokemonGo-Bot/venv/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte 2016-08-25 13:35:57,560 [sentry.errors.uncaught] [ERROR] [u"TypeError: unhashable type: 'list'", u' File "pokecli.py", line 705, in <module>', u' File "pokecli.py", line 118, in main', u' File "pokemongo_bot/__init__.py", line 610, in tick', u' File "pokemongo_bot/cell_workers/move_to_map_pokemon.py", line 341, in work', u' File "pokemongo_bot/walkers/step_walker.py", line 93, in step', u' File "pokemongo_bot/__init__.py", line 1185, in heartbeat']

@duttonw
Copy link
Contributor Author

duttonw commented Aug 25, 2016

@solderzzc sorry about that, i'll debug it a bit more. since badges don't happen all the time, i was testing the emit message by including the int in the call. i then replaced it with the array dict item. sadly python is not my primary language so i did not forsee it dying like that. I'll get a another commit to fix it. most likely by collecting the badge int before feeding it into the int to enum name library. and run it through a new account to ensure it works. i do need help on the equip_badge call as that files. i've left it in but commented out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants